# -*- coding: utf-8 -*-

from PySide.QtGui import *
from PySide.QtCore import *
import sys
import t10view,t10view_1,t10view_2

class MyTest(QDialog):
    def __init__(self,parent=None):
        super(MyTest,self).__init__(parent)

        firstUi=t10view.Ui_Dialog()
        secondUi=t10view_1.Ui_Dialog()
        self.thirdUi=t10view_2.Ui_Dialog()

        tabWidget=QTabWidget(self)
        w1 = QWidget()
        firstUi.setupUi(w1)
        w2=QWidget()
        secondUi.setupUi(w2)

        tabWidget.addTab(w1,"First")
        tabWidget.addTab(w2,"Second")
        tabWidget.resize(380,380)

        self.connect(firstUi.pushButton,SIGNAL("clicked()"),self.slotChild)
        self.connect(secondUi.closeButton,SIGNAL("clicked()"),self,SLOT("reject()"))

    def slotChild(self):
        dlg=QDialog()
        self.thirdUi.setupUi(dlg)
        self.connect(self.thirdUi.pushButton,SIGNAL("clicked()"),self,SLOT("reject()"))
        dlg.exec_()

if __name__ =="__main__":
    app = QApplication(sys.argv)
    dialog=MyTest()
    dialog.show()
    sys.exit(app.exec_())